package com.soft.entity;


//用户信息
public class UserInfo {

    private String id;//用户账号
    private String name;//用户姓名
    private int level;//用户等级
    private String password;//用户密码
    private String address;//用户城市
    private String postalCode;//邮政编码
    private String idNumber;//证件号
    private int idType;//证件类型
    private String telephone;//电话号码
    private String email;//邮箱
    private int status;//账户状态

    public UserInfo() {}

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setLevel(String level) {
        this.level = Integer.parseInt(level);
    }

    public int getLevel() {
        return level;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdType(String idType) {
        this.idType = Integer.parseInt(idType);
    }

    public int getIdType() {
        return idType;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setStatus(String status) {
        this.status = Integer.parseInt(status);
    }

    public int getStatus() {
        return status;
    }

    public String getLevelText (int level){
        String txt = "";
        switch (level) {
            case LEVEL.LEVEL_NORMAL:txt = "普通用户";break;
            case LEVEL.LEVEL_NORMAL_VIP:txt = "普通会员";break;
            case LEVEL.LEVEL_GOLD_VIP:txt = "黄金会员";break;
            case LEVEL.LEVEL_DIAMOND_VIP:txt = "钻石会员";break;
        }
        return txt;
    }

    public static final class LEVEL {
        public static final int LEVEL_NORMAL = 0;//普通用户
        public static final int LEVEL_NORMAL_VIP = 1;//普通会员
        public static final int LEVEL_GOLD_VIP= 2;//黄金会员
        public static final int LEVEL_DIAMOND_VIP = 3;//钻石会员
    }

    public static final class IDTYPE {
        public static final int IDTYPE_ID = 0;//身份证
        public static final int IDTYPE_MILITARY = 1;//军官证
        public static final int IDTYPE_STUDENT = 2;//学生证
    }

    public static final class STATUS {
        public static final int STATUS_NORMAL = 1;//账户正常
        public static final int STATUS_FREEZE = 0;//账户冻结
    }
}
